<?php
/**
 * @version			$Id$
 * @author			Richard Asp
 * @package			Joomla
 * @subpackage		gnudoor
 * @copyright		(C) 2010 gnudoor LLC
 * @license      GNU/GPL, see LICENSE.php
 * Joomla! is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * See COPYRIGHT.php for copyright notices and details.
 */

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport('joomla.application.component.controller');

class GnudoorControllerProviders extends GnudoorController
{
    function display() {
    	JRequest::setVar( 'view', 'providers' );
		JRequest::setVar( 'layout', 'default');
    	parent::display();
    }
    function takeownership() {
    	JRequest::setVar( 'view', 'providers' );
		JRequest::setVar( 'layout', 'default_takeownership');
    	parent::display();
    	
    }
    function saverecord() {
        $model = $this->getModel('Providers');
	if ($model->store($post)) {
		$msg = JText::_( 'Record Saved!' );
	} else {
		$msg = JText::_( 'Error Saving Record' );
	}
	// Check the table in so it can be edited.... we are done with it anyway
	$link = JRoute::_('index.php?option=com_gnudoor&controller=providers');
	$this->setRedirect($link);
    }
	function cancel() {
	    $msg = JText::_( 'Operation Cancelled' );
	    $this->setRedirect( 'index.php?option=com_gnudoor', $msg );
	}
    

}

?>